home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Kit PC World De Ampliacion De Windows 95
/
Kit PC World de ampliacion de Windows 95.iso
/
internet
/
sweeper
/
samples
/
docobj
/
iadvsink.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1995-11-22
|
2KB
|
122 lines
/*
* IADVSINK.CPP
* IAdviseSink for Document Objects CSite class
*
* Copyright (c)1995 Microsoft Corporation, All Rights Reserved
* Kraig Brockschmidt, kraigb@microsoft.com
*/
#include "framer.h"
/*
* CImpIAdviseSink::CImpIAdviseSink
* CImpIAdviseSink::~CImpIAdviseSink
*
* Parameters (Constructor):
* pSite PCSite of the site we're in.
* pUnkOuter LPUNKNOWN to which we delegate.
*/
CImpIAdviseSink::CImpIAdviseSink(PCSite pSite
, LPUNKNOWN pUnkOuter)
{
m_cRef=0;
m_pSite=pSite;
m_pUnkOuter=pUnkOuter;
return;
}
CImpIAdviseSink::~CImpIAdviseSink(void)
{
return;
}
/*
* CImpIAdviseSink::QueryInterface
* CImpIAdviseSink::AddRef
* CImpIAdviseSink::Release
*
* Purpose:
* IUnknown members for CImpIAdviseSink object.
*/
STDMETHODIMP CImpIAdviseSink::QueryInterface(REFIID riid, void **ppv)
{
return m_pUnkOuter->QueryInterface(riid, ppv);
}
STDMETHODIMP_(ULONG) CImpIAdviseSink::AddRef(void)
{
++m_cRef;
return m_pUnkOuter->AddRef();
}
STDMETHODIMP_(ULONG) CImpIAdviseSink::Release(void)
{
--m_cRef;
return m_pUnkOuter->Release();
}
/*
* Unused members in CImpIAdviseSink
* OnDataChange
* OnViewChange
* OnRename
* OnSave
*/
STDMETHODIMP_(void) CImpIAdviseSink::OnDataChange(LPFORMATETC pFEIn
, LPSTGMEDIUM pSTM)
{
return;
}
STDMETHODIMP_(void) CImpIAdviseSink::OnViewChange(DWORD dwAspect
, LONG lindex)
{
return;
}
STDMETHODIMP_(void) CImpIAdviseSink::OnRename(LPMONIKER pmk)
{
return;
}
STDMETHODIMP_(void) CImpIAdviseSink::OnSave(void)
{
return;
}
/*
* CImpIAdviseSink::OnClose
*
* Purpose:
* Informs the advise sink that the OLE object has closed and is
* no longer bound in any way. We use this to do a File/Close
* to delete the object since we don't hold onto any.
*
* Parameters:
* None
*
* Return Value:
* None
*/
STDMETHODIMP_(void) CImpIAdviseSink::OnClose(void)
{
//This does the same as File/Close
m_pSite->m_pFR->Close();
return;
}